feat: add mailbox management tools (list, create, move)#109
Open
trofimovm wants to merge 2 commits intoai-zerolab:mainfrom
Open
feat: add mailbox management tools (list, create, move)#109trofimovm wants to merge 2 commits intoai-zerolab:mainfrom
trofimovm wants to merge 2 commits intoai-zerolab:mainfrom
Conversation
Add three new MCP tools for mailbox/folder management: - list_mailboxes: List all available mailboxes/folders - create_mailbox: Create a new mailbox/folder - move_emails: Move emails between mailboxes Implementation details: - Added abstract methods to EmailHandler interface - Implemented methods in EmailClient and ClassicEmailHandler - Uses COPY + DELETE + EXPUNGE for move (IMAP compatibility) - Proper mailbox name quoting via _quote_mailbox() for RFC 3501
for more information, see https://pre-commit.ci
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
perelin
added a commit
to perelin/mcp-email-server
that referenced
this pull request
Feb 1, 2026
Cherry-picked from upstream PR ai-zerolab#109. Adds move_emails, list_mailboxes, and create_mailbox tools for folder management. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds three new MCP tools for mailbox/folder management:
list_mailboxes- List all available mailboxes/folders for an email accountcreate_mailbox- Create a new mailbox/foldermove_emails- Move one or more emails to another mailbox/folderChanges
EmailHandlerinterfaceEmailClientandClassicEmailHandlerapp.py_quote_mailbox()for RFC 3501 complianceUse Cases
Test Plan
list_mailboxeswith Yandex Mailcreate_mailboxcreates folder successfullymove_emailsmoves messages and removes from source